<template>
	<view>
		<view class="box">
			<view class="title">平台信息</view>
			<view class="content">用户PC端地址：<span class="blueText">https://zdyee.hnhuicha.com/pc/user/login</span><span
					style="margin-left: 32rpx;" @click="copyOrderNum">复制</span></view>
			<view>版权所有：湖南慧察科技有限公司</view>
		</view>
		<view style="height: 16rpx;background-color: #F5F5F5;"></view>
		<view class="box">
			<view class="title">联系我们</view>
			<view class="content">如有疑问，可微信或电话与我们联系。</view>
			<view>联系电话：<span class="blueText" @click="freeTell">13439494660</span></view>
		</view>
		
		<view class="img-box" v-if="sinfo.environment && sinfo.environment == 'wxwork'">
			<image show-menu-by-longpress="true" class="myImg" src="https://zdypubobs.hnhuicha.com/zdy/qywxcode.png" @longpress="seeQRcode"></image>
		</view>
		<view class="img-box" v-else>
			<image show-menu-by-longpress="true" class="myImg" src="https://zdypubobs.hnhuicha.com/zdy/qywxcode.png"></image>
		</view>

	</view>
</template>

<script>
	// import wxcode from '@/pages/subPackagesD/images/wxcode.png'
	export default {
		data() {
			return {
				sinfo:{},
			}
		},
		onShow() {
			const sinfo = uni.getSystemInfoSync();
			this.sinfo=sinfo
		},
		methods: {
			seeQRcode() {
				uni.previewImage({
					urls: ['https://zdypubobs.hnhuicha.com/zdy/qywxcode.png'],
					longPressActions: {
						itemList: ['发送给朋友', '保存图片', '收藏'],
						success: function(data) {
							console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
						},
						fail: function(err) {
							console.log(err.errMsg);
						}
					}
				});
			},
			freeTell() {
				wx.makePhoneCall({
					phoneNumber: '134-3949-4660', //仅为示例，并非真实的电话号码
					success: function() {
						console.log("拨打电话成功！")
					},
					fail: function() {
						console.log("拨打电话失败！")
					}
				})
			},
			copyOrderNum() {
				uni.setClipboardData({
					data: 'https://zdyee.hnhuicha.com/pc/user/login',
					success: function() {
						uni.$u.toast('复制成功')
					},
					fail: function() {
						console.log('error');
					},
				});
			}
		},
	}
</script>

<style lang="scss" scoped>
	.box {
		padding: 32rpx;
		color: #666666;
		font-size: 28rpx;

		.title {
			font-size: 32rpx;
			color: #4D4D4D;
			margin-bottom: 24rpx;
		}

		.content {
			margin-bottom: 16rpx;

		}

		.blueText {
			color: #0F53AC;
		}
	}

	.img-box {
		width: 100%;
		display: flex;
		justify-content: center;
		align-items: center;
		margin-bottom: 32rpx;

		.myImg {
			width: 408rpx;
			height: 532rpx;
		}
	}

	.btn-box {

		width: 100%;
		display: flex;
		justify-content: center;
		align-items: center;

		.btn {
			border-radius: 6px;
			border: 1px solid #0F53AC;
			display: flex;
			justify-content: center;
			align-items: center;
			padding: 10px 36px 10px 36px;
			color: #0F53AC;
			font-size: 32rpx;
		}
	}
</style>
